package interfaceCustomer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.SwingConstants;

public class CustomerLookUpOrderPanel extends JPanel implements ActionListener  {	
	private JButton btnBackToMenu;
	private JLabel lblCusId;
	private JLabel lblCusName;
	private JTextField txtCusId;
	private JTextField txtCusName;
	private JScrollPane sp;
	private CustomerFrame backtomenu;  //reference to menu 
	
	public CustomerLookUpOrderPanel(CustomerFrame cf) {
		
		backtomenu = cf;
		this.setLayout(null);
	//	this.getContentPane().setBackground(new Color(0,0,0));
		
	
		btnBackToMenu = new JButton("Back To Menu");
		btnBackToMenu.setHorizontalAlignment(SwingConstants.LEADING);
		btnBackToMenu.setBounds(10, 296, 114, 23);
		this.add(btnBackToMenu);
		btnBackToMenu.addActionListener(this);
		
		txtCusId = new JTextField();
		txtCusId.setBounds(90, 6, 91, 20);
		this.add(txtCusId);
		txtCusId.setEditable(false);
		
		lblCusId = new JLabel("Customer ID:");
		lblCusId.setBounds(10, 9, 80, 14);
		this.add(lblCusId);
		
		txtCusName = new JTextField();
		txtCusName.setBounds(318, 6, 80, 20);
		this.add(txtCusName);
		txtCusName.setEditable(false);
		sp= new JScrollPane();
		sp.setBounds(10, 51, 405, 234);
		this.add(sp);		
		
		lblCusName = new JLabel("Customer Name:");
		lblCusName.setBounds(216, 9, 100, 14);
		this.add(lblCusName);
	}


	public void lookForOrder() {
	}

	public void changePersonalInfo() {
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		if(e.getSource() == btnBackToMenu) {
			backtomenu.ChangePanel(0);
		}
	}
}